package com.example.football.mapper;


import com.example.football.pojo.News;
import com.example.football.pojo.People;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface NewsMapper {
    @Select("select * from news where id in (select distinct newsid from newskey where " +
            "keyz in(select liketeam from peopleliketeam where peopleid = #{id}) or keyz in" +
            "(select likestar from peoplelikestar where peopleid = #{id}))")
    List<News> findNews(People id);
}
